<?php use_helper('Javascript') ?>

<h1>Movie List</h1>

<table border="1">
  <thead>
    <tr>
      <th>Id</th>
      <th>Name</th>
      <th>Release date</th>
      <th>Genre</th>
      <th>Time (mins)</th>
      <th>Company</th>
      <th>Medium</th>
      <th>Site</th>
    </tr>
  </thead>
  <tbody>
    <?php foreach ($movie_list as $movie): ?>
    <tr>
      <td><?php echo link_to_remote($movie->getId(), array(
		'url'    => 'movie/edit?id='.$movie->getId(),
		'update' => 'list'));
	?></td>
      <td><?php echo $movie->getName() ?></td>
      <td><?php echo $movie->getReleasedate() ?></td>
      <td><?php echo $movie->getGenre() ?></td>
      <td><?php echo $movie->getTime() ?></td>
      <td><?php echo $movie->getCompany() ?></td>
      <td><?php echo $movie->getMedium() ?></td>
      <td><?php echo $movie->getSite() ?></td>
    </tr>
    <?php endforeach; ?>
  </tbody>
</table>

<?php echo link_to_remote('New', array(
		'url'    => 'movie/new',
		'update' => 'list'));
?>

